<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SWM34S_LVGL7.11_SWMUI: C:/Users/DELL/Desktop/Commit/lvgl/SWM34S_LVGL7.11_SWMUI_20230515/APP/BSP/dev_touch.c 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SWM34S_LVGL7.11_SWMUI<span id="projectnumber">&#160;V7.9</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.5 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_0ca16891106f5a3e9ad635a0d6c5f98f.html">APP</a></li><li class="navelem"><a class="el" href="dir_4ca18d753a70f6eada20fde478bd3fc8.html">BSP</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">dev_touch.c</div></div>
</div><!--header-->
<div class="contents">
<a href="dev__touch_8c.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="preprocessor">#include &quot;<a class="code" href="dev__touch_8h.html">dev_touch.h</a>&quot;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span> </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="preprocessor">#if (TP_TYPE == TP_GT911)</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span><span class="preprocessor">    #include &quot;<a class="code" href="_t_p___g_t911_8h.html">TP_GT911.h</a>&quot;</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="preprocessor">#elif (TP_TYPE == TP_FT6336)</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span><span class="preprocessor">    #include &quot;<a class="code" href="_t_p___f_t6336_8h.html">TP_FT6336.h</a>&quot;</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span><span class="preprocessor">#elif (TP_TYPE == TP_CST826)</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span><span class="preprocessor">    #include &quot;<a class="code" href="_t_p___c_s_t826_8h.html">TP_CST826.h</a>&quot;</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span><span class="preprocessor">#elif (TP_TYPE == TP_FT5206)</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span><span class="preprocessor">    #include &quot;<a class="code" href="_t_p___f_t5206_8h.html">TP_FT5206.h</a>&quot;</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span><span class="preprocessor">#elif (TP_TYPE == TP_CST328)</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span><span class="preprocessor">    #include &quot;<a class="code" href="_t_p___c_s_t328_8h.html">TP_CST328.h</a>&quot;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span><span class="preprocessor">#elif (TP_TYPE == TP_TANGO_C32)</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span><span class="preprocessor">    #include &quot;<a class="code" href="_t_p___tango___c32_8h.html">TP_Tango_C32.h</a>&quot;</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span><span class="preprocessor">#elif (TP_TYPE == TP_ILI2117A)</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span><span class="preprocessor">    #include &quot;<a class="code" href="_t_p___i_l_i2117_a_8h.html">TP_ILI2117A.h</a>&quot;</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span><span class="preprocessor">    #error &quot;You must provide your customized resolution Driver!&quot;</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span> </div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="dev__touch_8c.html#a5a167336ba39168b4117c85a7f7f364e">   42</a></span><span class="preprocessor">#define TP_MAX_POINTS        (5) </span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span><span class="comment">/*******************************************************************************************************************************************</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span><span class="comment"> * Private Prototype</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span><span class="comment"> *******************************************************************************************************************************************/</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="dev__touch_8c.html#aa04ed8d9159d0fe710b89b9f83109a2c">touch_close</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span> </div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span><span class="comment">/*******************************************************************************************************************************************</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span><span class="comment"> * Private Variable</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span><span class="comment"> *******************************************************************************************************************************************/</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"><a class="line" href="dev__touch_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31a">   57</a></span><span class="keyword">typedef</span> <span class="keyword">enum</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span>{</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"><a class="line" href="dev__touch_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31aa0d077f5b932ce05e5b9f30c6087a2f31">   59</a></span>    <a class="code hl_enumvalue" href="dev__touch_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31aa0d077f5b932ce05e5b9f30c6087a2f31">NO</a> = 0, </div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span>    <a class="code hl_enumvalue" href="dev__touch_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31aa2bc49ec37d6a5715dd23e85f1ff5bb59">OK</a>      </div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span>    <span class="comment">/* 可以枚举拓展 ++ 累计触发次数 */</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"><a class="line" href="dev__touch_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31aa2bc49ec37d6a5715dd23e85f1ff5bb59">   62</a></span>} <a class="code hl_enumeration" href="dev__touch_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31a">irq_flag_t</a>;</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span> </div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="dev__touch_8c.html#ab6150fbc07d4a5fe08cc7aa42d8d173e">   65</a></span><span class="keyword">static</span> <span class="keyword">volatile</span> uint8_t <a class="code hl_variable" href="dev__touch_8c.html#ab6150fbc07d4a5fe08cc7aa42d8d173e">IRQ_Flag_TP</a> = <a class="code hl_enumvalue" href="dev__touch_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31aa0d077f5b932ce05e5b9f30c6087a2f31">NO</a>;</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span> </div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="dev__touch_8c.html#a1f8d52db1d1006c9c286828db79a820a">   68</a></span><span class="keyword">static</span> <a class="code hl_struct" href="structtp__data__t.html">tp_data_t</a> <a class="code hl_variable" href="dev__touch_8c.html#a1f8d52db1d1006c9c286828db79a820a">TP_Points_Data</a>[<a class="code hl_define" href="dev__touch_8c.html#a5a167336ba39168b4117c85a7f7f364e">TP_MAX_POINTS</a>];</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span> </div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span><span class="comment">/*******************************************************************************************************************************************</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span><span class="comment"> * Public Variable</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span><span class="comment"> *******************************************************************************************************************************************/</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"><a class="line" href="dev__touch_8c.html#a84c114ba14f4f7ca7c2258db06b98d87">   73</a></span><a class="code hl_struct" href="structdev__tp__t.html">dev_tp_t</a> <a class="code hl_variable" href="dev__touch_8c.html#a84c114ba14f4f7ca7c2258db06b98d87">Dev_TP</a> = {</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span>    .<a class="code hl_variable" href="structdev__tp__t.html#ade186a1e352f443f71fa39c14af5b674">point</a> = <a class="code hl_variable" href="dev__touch_8c.html#a1f8d52db1d1006c9c286828db79a820a">TP_Points_Data</a>,</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>    .points_num = <a class="code hl_define" href="dev__touch_8c.html#a5a167336ba39168b4117c85a7f7f364e">TP_MAX_POINTS</a>,</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span>    .type = <a class="code hl_enumvalue" href="dev__touch_8h.html#ab82e9fc0994f9cf732d62c6e02271973a5b57370396b7de414e4132f4fadc8885">TP_TYPE_CT</a>,</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span>    .mode = <a class="code hl_enumvalue" href="dev__touch_8h.html#a4d8890ebc8ff6e7826af41519043e77ea03d9705d179305c0dc4c1ef0fce65b83">TP_MODE_INT_RX</a>,</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span> </div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span>    <span class="comment">/* Callback Register */</span></div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span><span class="preprocessor">#if (TP_TYPE == TP_GT911)</span></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span>    .init_cb = <a class="code hl_function" href="_t_p___g_t911_8c.html#a5608f2d5eda0220a6ac23f3c87a46b20">gt9x_init</a>,</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span>    .read_cb = <a class="code hl_function" href="_t_p___g_t911_8c.html#aa83bf1a4b564b246d303c28944d275fb">gt9x_read_points</a>,</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span>    .close_cb = <a class="code hl_function" href="dev__touch_8c.html#aa04ed8d9159d0fe710b89b9f83109a2c">touch_close</a>,</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span> </div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span><span class="preprocessor">#elif (TP_TYPE == TP_FT6336)</span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span>    .init_cb = <a class="code hl_function" href="_t_p___f_t6336_8c.html#aa77f83f70b13c86ec2718be1c6adc5ba">ft6336_init</a>,</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span>    .read_cb = <a class="code hl_function" href="_t_p___f_t6336_8c.html#ad97b1b8850358ee6c69e3a1e25968d1e">ft6336_read_points</a>,</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span>    .close_cb = <a class="code hl_function" href="dev__touch_8c.html#aa04ed8d9159d0fe710b89b9f83109a2c">touch_close</a>,</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span>    </div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span><span class="preprocessor">#elif (TP_TYPE == TP_CST826)</span></div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span>    .init_cb = <a class="code hl_function" href="_t_p___c_s_t826_8c.html#a91b5a8431a4726d1f7686c01887a0502">cst826_init</a>,</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span>    .read_cb = <a class="code hl_function" href="_t_p___c_s_t826_8c.html#a79a66ee95ff40894beed97948b6f8373">cst826_read_points</a>,</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span>    .close_cb = <a class="code hl_function" href="dev__touch_8c.html#aa04ed8d9159d0fe710b89b9f83109a2c">touch_close</a>,</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span>    </div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span><span class="preprocessor">#elif (TP_TYPE == TP_FT5206)</span></div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span>    .init_cb = <a class="code hl_function" href="_t_p___f_t5206_8c.html#ac61d684091c0d51d4047010336ff3329">ft5206_init</a>,</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span>    .read_cb = <a class="code hl_function" href="_t_p___f_t5206_8c.html#ace332a5ffb19c9f37ac89a2625a51542">ft5206_read_points</a>,</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span>    .close_cb = <a class="code hl_function" href="dev__touch_8c.html#aa04ed8d9159d0fe710b89b9f83109a2c">touch_close</a>,</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span>    </div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span><span class="preprocessor">#elif (TP_TYPE == TP_CST328)</span></div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span>    .init_cb = <a class="code hl_function" href="_t_p___c_s_t328_8c.html#a189ffdc1f63d29a4894d7771d8ef1978">cst328_init</a>,</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span>    .read_cb = <a class="code hl_function" href="_t_p___c_s_t328_8c.html#ade3220d3a5cc117ef36843c0a46be48c">cst328_read_points</a>,</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span>    .close_cb = <a class="code hl_function" href="dev__touch_8c.html#aa04ed8d9159d0fe710b89b9f83109a2c">touch_close</a>,</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span>    </div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span><span class="preprocessor">#elif (TP_TYPE == TP_TANGO_C32)</span></div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span>    .init_cb = <a class="code hl_function" href="_t_p___tango___c32_8c.html#a07960df025fbd2b94adb95a629e2f897">tango_c32_init</a>,</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span>    .read_cb = <a class="code hl_function" href="_t_p___tango___c32_8c.html#a572b4cb1eb277e324904f37d7f16ce3f">tango_c32_read_points</a>,</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span>    .close_cb = <a class="code hl_function" href="dev__touch_8c.html#aa04ed8d9159d0fe710b89b9f83109a2c">touch_close</a>,</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span>    </div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span><span class="preprocessor">#elif (TP_TYPE == TP_ILI2117A)</span></div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span>    .init_cb = <a class="code hl_function" href="_t_p___i_l_i2117_a_8c.html#aceee704e77dcfa7ddfa00e3d2450f6a6">ili2117a_init</a>,</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span>    .read_cb = <a class="code hl_function" href="_t_p___i_l_i2117_a_8c.html#a480e40a4792ec713b441d8d1880bfd09">ili2117a_read_points</a>,</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span>    .close_cb = <a class="code hl_function" href="dev__touch_8c.html#aa04ed8d9159d0fe710b89b9f83109a2c">touch_close</a>,</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span>    </div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span><span class="preprocessor">    #error &quot;You must provide your customized resolution Driver!&quot;</span></div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span>};</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span><span class="comment">/*******************************************************************************************************************************************</span></div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span><span class="comment"> * Public Function</span></div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno">  121</span><span class="comment"> *******************************************************************************************************************************************/</span></div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"><a class="line" href="dev__touch_8c.html#a84efe5d28ced56c26ea07c936b7a625a">  125</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="dev__touch_8c.html#a84efe5d28ced56c26ea07c936b7a625a">isr_exti_tp_int</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span>{</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span>    <span class="keywordflow">if</span> (EXTI_State(<a class="code hl_define" href="dev__touch_8h.html#a886e6b681d04e833135384b906c35855">TP_GPIO_INT</a>, <a class="code hl_define" href="dev__touch_8h.html#a0f516787a212a8060cd70b0d03ae1b13">TP_PIN_INT</a>))</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span>    {</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno">  129</span>        EXTI_Clear(<a class="code hl_define" href="dev__touch_8h.html#a886e6b681d04e833135384b906c35855">TP_GPIO_INT</a>, <a class="code hl_define" href="dev__touch_8h.html#a0f516787a212a8060cd70b0d03ae1b13">TP_PIN_INT</a>);</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span>        <a class="code hl_variable" href="dev__touch_8c.html#ab6150fbc07d4a5fe08cc7aa42d8d173e">IRQ_Flag_TP</a> = <a class="code hl_enumvalue" href="dev__touch_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31aa2bc49ec37d6a5715dd23e85f1ff5bb59">OK</a>;</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span>    }</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno">  132</span>}</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span> </div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"><a class="line" href="dev__touch_8c.html#ad79fb3af238f076a0aa90e32a43ab77e">  140</a></span>uint8_t <a class="code hl_function" href="dev__touch_8c.html#ad79fb3af238f076a0aa90e32a43ab77e">touch_init</a>(<a class="code hl_struct" href="structdev__tp__t.html">dev_tp_t</a> *dev)</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span>{</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span>    uint8_t res = 1;</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno">  143</span>    </div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno">  144</span>    <span class="keywordflow">for</span> (uint16_t i = 0; i &lt; dev-&gt;<a class="code hl_variable" href="structdev__tp__t.html#a7b6262bfcb571b59fb3f322165d24a05">points_num</a>; ++i)</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno">  145</span>    {</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno">  146</span>        dev-&gt;<a class="code hl_variable" href="structdev__tp__t.html#ade186a1e352f443f71fa39c14af5b674">point</a>[i].<a class="code hl_variable" href="structtp__data__t.html#a4dde988b1b2adba65ae3efa69f65d960">x</a> = 0;</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span>        dev-&gt;<a class="code hl_variable" href="structdev__tp__t.html#ade186a1e352f443f71fa39c14af5b674">point</a>[i].<a class="code hl_variable" href="structtp__data__t.html#ab0580f504a7428539be299fa71565f30">y</a> = 0;</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span>        dev-&gt;<a class="code hl_variable" href="structdev__tp__t.html#ade186a1e352f443f71fa39c14af5b674">point</a>[i].<a class="code hl_variable" href="structtp__data__t.html#a5202f2d226d6bf6ec85c52304098acd2">event</a> = <a class="code hl_enumvalue" href="dev__touch_8h.html#a9fffde3171a44771a6e9f8f0cbb52d71a693480a7cbe7d8d0a9d07a2d66ee9da2">TP_EVENT_RELEASED</a>;</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno">  149</span>        dev-&gt;<a class="code hl_variable" href="structdev__tp__t.html#ade186a1e352f443f71fa39c14af5b674">point</a>[i].<a class="code hl_variable" href="structtp__data__t.html#a09a2a45f731b02946ff6d3cd15c1a476">width</a> = 0;</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno">  150</span>        dev-&gt;<a class="code hl_variable" href="structdev__tp__t.html#ade186a1e352f443f71fa39c14af5b674">point</a>[i].<a class="code hl_variable" href="structtp__data__t.html#ad46edbc9fffadbdca72080b49ea63ac8">track_id</a> = 0;</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno">  151</span>    }</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno">  152</span>    </div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno">  153</span>    res = dev-&gt;<a class="code hl_variable" href="structdev__tp__t.html#ad0f91d3c2b3f1fef36a3530341576d6b">init_cb</a>();</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno">  154</span>    </div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span>    <span class="keywordflow">if</span> (dev-&gt;<a class="code hl_variable" href="structdev__tp__t.html#af3031ab65710d467a459643a51e94949">mode</a> == <a class="code hl_enumvalue" href="dev__touch_8h.html#a4d8890ebc8ff6e7826af41519043e77ea03d9705d179305c0dc4c1ef0fce65b83">TP_MODE_INT_RX</a>)</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno">  156</span>    {</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span>        <span class="comment">/* 中断方式选用边沿触发，则需要在 TP_IC 初始化中设置 TP 芯片的扫描方式为中断触发，</span></div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno">  158</span><span class="comment">         * 如此才能使得长时间按压时不断触发 TP_INT 边沿脉冲信号</span></div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno">  159</span><span class="comment">         */</span></div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno">  160</span>        GPIO_Init(<a class="code hl_define" href="dev__touch_8h.html#a886e6b681d04e833135384b906c35855">TP_GPIO_INT</a>, <a class="code hl_define" href="dev__touch_8h.html#a0f516787a212a8060cd70b0d03ae1b13">TP_PIN_INT</a>, 0, 0, 0, 0);</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno">  161</span>        EXTI_Init(<a class="code hl_define" href="dev__touch_8h.html#a886e6b681d04e833135384b906c35855">TP_GPIO_INT</a>, <a class="code hl_define" href="dev__touch_8h.html#a0f516787a212a8060cd70b0d03ae1b13">TP_PIN_INT</a>, EXTI_FALL_EDGE); <span class="comment">/* EXTI_FALL_EDGE - 下降沿触发 / EXTI_RISE_EDGE - 上升沿触发 */</span></div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno">  162</span>        NVIC_EnableIRQ(<a class="code hl_define" href="dev__touch_8h.html#a479dbee3a96123ab3deb85133104cbab">TP_INT_IRQn</a>);</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span>        EXTI_Open(<a class="code hl_define" href="dev__touch_8h.html#a886e6b681d04e833135384b906c35855">TP_GPIO_INT</a>, <a class="code hl_define" href="dev__touch_8h.html#a0f516787a212a8060cd70b0d03ae1b13">TP_PIN_INT</a>);</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno">  164</span>    }</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno">  165</span>    <span class="keywordflow">return</span> res;</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno">  166</span>}</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno">  167</span> </div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"><a class="line" href="dev__touch_8c.html#a4155438389d8b8b802f7f20534056bf0">  174</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="dev__touch_8c.html#a4155438389d8b8b802f7f20534056bf0">touch_handler</a>(<a class="code hl_struct" href="structdev__tp__t.html">dev_tp_t</a> *dev)</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno">  175</span>{</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno">  176</span>    uint8_t points = 0;</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno">  177</span>    </div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno">  178</span>    <span class="keywordflow">if</span> (dev-&gt;<a class="code hl_variable" href="structdev__tp__t.html#af3031ab65710d467a459643a51e94949">mode</a> == <a class="code hl_enumvalue" href="dev__touch_8h.html#a4d8890ebc8ff6e7826af41519043e77ea03d9705d179305c0dc4c1ef0fce65b83">TP_MODE_INT_RX</a>) <span class="comment">/* 中断 INT 触发模式 */</span></div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno">  179</span>    {</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno">  180</span>        <span class="keywordflow">if</span> (<a class="code hl_variable" href="dev__touch_8c.html#ab6150fbc07d4a5fe08cc7aa42d8d173e">IRQ_Flag_TP</a> == <a class="code hl_enumvalue" href="dev__touch_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31aa2bc49ec37d6a5715dd23e85f1ff5bb59">OK</a>)</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno">  181</span>        {</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno">  182</span>            <a class="code hl_variable" href="dev__touch_8c.html#ab6150fbc07d4a5fe08cc7aa42d8d173e">IRQ_Flag_TP</a> = <a class="code hl_enumvalue" href="dev__touch_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31aa0d077f5b932ce05e5b9f30c6087a2f31">NO</a>;</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno">  183</span>            </div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno">  184</span>            points = dev-&gt;<a class="code hl_variable" href="structdev__tp__t.html#a4f710901c7b478810ab1e3d1b7332989">read_cb</a>(dev-&gt;<a class="code hl_variable" href="structdev__tp__t.html#ade186a1e352f443f71fa39c14af5b674">point</a>, 1);</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno">  185</span>            <span class="comment">/*</span></div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno">  186</span><span class="comment">            printf(&quot;Your Touch point num = [%d], event &lt;%s&gt;, [x] = [%d], [y] = [%d]\r\n&quot;,</span></div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno">  187</span><span class="comment">                   points, (dev-&gt;point[0].event == TP_EVENT_PRESSED) ? &quot;press&quot; : &quot;release&quot;, dev-&gt;point[0].x, dev-&gt;point[0].y</span></div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno">  188</span><span class="comment">            );*/</span></div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno">  189</span>        }</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno">  190</span>    }</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno">  191</span>    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (dev-&gt;<a class="code hl_variable" href="structdev__tp__t.html#af3031ab65710d467a459643a51e94949">mode</a> == <a class="code hl_enumvalue" href="dev__touch_8h.html#a4d8890ebc8ff6e7826af41519043e77ea341fdaa08fa997570c0b89e6e4bf5068">TP_MODE_POLLING_RDONLY</a>) <span class="comment">/* 轮询读取模式 */</span></div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno">  192</span>    {</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno">  193</span>        points = dev-&gt;<a class="code hl_variable" href="structdev__tp__t.html#a4f710901c7b478810ab1e3d1b7332989">read_cb</a>(dev-&gt;<a class="code hl_variable" href="structdev__tp__t.html#ade186a1e352f443f71fa39c14af5b674">point</a>, 1);</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno">  194</span>    }</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno">  195</span> </div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno">  196</span>    <span class="keywordflow">if</span> (dev-&gt;<a class="code hl_variable" href="structdev__tp__t.html#ade186a1e352f443f71fa39c14af5b674">point</a>-&gt;<a class="code hl_variable" href="structtp__data__t.html#a5202f2d226d6bf6ec85c52304098acd2">event</a> == <a class="code hl_enumvalue" href="dev__touch_8h.html#a9fffde3171a44771a6e9f8f0cbb52d71a0b306b969e605870813a875062f36d2a">TP_EVENT_PRESSED</a>)</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno">  197</span>    {</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno">  198</span>        <span class="comment">/* 手指触摸释放时长 */</span></div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno">  199</span>        <span class="keyword">extern</span> <span class="keyword">volatile</span> uint32_t <a class="code hl_variable" href="main_8c.html#a7d9f2d02fb8222f2a32fc7eeeed8e655">Systick_Ms_TP</a>;</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno">  200</span>        <a class="code hl_variable" href="main_8c.html#a7d9f2d02fb8222f2a32fc7eeeed8e655">Systick_Ms_TP</a> = 0;</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno">  201</span>    }</div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno">  202</span>}</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno">  203</span> </div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno">  204</span><span class="comment">/*******************************************************************************************************************************************</span></div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno">  205</span><span class="comment"> * Private Function</span></div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno">  206</span><span class="comment"> *******************************************************************************************************************************************/</span></div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"><a class="line" href="dev__touch_8c.html#aa04ed8d9159d0fe710b89b9f83109a2c">  211</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="dev__touch_8c.html#aa04ed8d9159d0fe710b89b9f83109a2c">touch_close</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno">  212</span>{</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno">  213</span>    NVIC_DisableIRQ(<a class="code hl_define" href="dev__touch_8h.html#a479dbee3a96123ab3deb85133104cbab">TP_INT_IRQn</a>);</div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno">  214</span>    EXTI_Close(<a class="code hl_define" href="dev__touch_8h.html#a886e6b681d04e833135384b906c35855">TP_GPIO_INT</a>, <a class="code hl_define" href="dev__touch_8h.html#a0f516787a212a8060cd70b0d03ae1b13">TP_PIN_INT</a>);</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno">  215</span>    I2C_Close(<a class="code hl_define" href="dev__touch_8h.html#a46828f8d24ffd6580f185ce41bd262eb">TP_I2C_X</a>);</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno">  216</span>}</div>
<div class="ttc" id="a_t_p___c_s_t328_8c_html_a189ffdc1f63d29a4894d7771d8ef1978"><div class="ttname"><a href="_t_p___c_s_t328_8c.html#a189ffdc1f63d29a4894d7771d8ef1978">cst328_init</a></div><div class="ttdeci">uint8_t cst328_init(void)</div><div class="ttdoc">初始化 TP_IC</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___c_s_t328_8c_source.html#l00190">TP_CST328.c:190</a></div></div>
<div class="ttc" id="a_t_p___c_s_t328_8c_html_ade3220d3a5cc117ef36843c0a46be48c"><div class="ttname"><a href="_t_p___c_s_t328_8c.html#ade3220d3a5cc117ef36843c0a46be48c">cst328_read_points</a></div><div class="ttdeci">uint8_t cst328_read_points(tp_data_t *p_data, uint8_t points)</div><div class="ttdoc">读取触摸点数据</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___c_s_t328_8c_source.html#l00248">TP_CST328.c:248</a></div></div>
<div class="ttc" id="a_t_p___c_s_t328_8h_html"><div class="ttname"><a href="_t_p___c_s_t328_8h.html">TP_CST328.h</a></div><div class="ttdoc">本例程为触摸 IC 驱动: CST328(海栎创)</div></div>
<div class="ttc" id="a_t_p___c_s_t826_8c_html_a79a66ee95ff40894beed97948b6f8373"><div class="ttname"><a href="_t_p___c_s_t826_8c.html#a79a66ee95ff40894beed97948b6f8373">cst826_read_points</a></div><div class="ttdeci">uint8_t cst826_read_points(tp_data_t *p_data, uint8_t points)</div><div class="ttdoc">读取触摸点数据</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___c_s_t826_8c_source.html#l00183">TP_CST826.c:183</a></div></div>
<div class="ttc" id="a_t_p___c_s_t826_8c_html_a91b5a8431a4726d1f7686c01887a0502"><div class="ttname"><a href="_t_p___c_s_t826_8c.html#a91b5a8431a4726d1f7686c01887a0502">cst826_init</a></div><div class="ttdeci">uint8_t cst826_init(void)</div><div class="ttdoc">初始化 TP_IC</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___c_s_t826_8c_source.html#l00127">TP_CST826.c:127</a></div></div>
<div class="ttc" id="a_t_p___c_s_t826_8h_html"><div class="ttname"><a href="_t_p___c_s_t826_8h.html">TP_CST826.h</a></div><div class="ttdoc">本例程为触摸 IC 驱动: CST826(海栎创)</div></div>
<div class="ttc" id="a_t_p___f_t5206_8c_html_ac61d684091c0d51d4047010336ff3329"><div class="ttname"><a href="_t_p___f_t5206_8c.html#ac61d684091c0d51d4047010336ff3329">ft5206_init</a></div><div class="ttdeci">uint8_t ft5206_init(void)</div><div class="ttdoc">初始化 TP_IC</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___f_t5206_8c_source.html#l00142">TP_FT5206.c:142</a></div></div>
<div class="ttc" id="a_t_p___f_t5206_8c_html_ace332a5ffb19c9f37ac89a2625a51542"><div class="ttname"><a href="_t_p___f_t5206_8c.html#ace332a5ffb19c9f37ac89a2625a51542">ft5206_read_points</a></div><div class="ttdeci">uint8_t ft5206_read_points(tp_data_t *p_data, uint8_t points)</div><div class="ttdoc">读取触摸点数据</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___f_t5206_8c_source.html#l00207">TP_FT5206.c:207</a></div></div>
<div class="ttc" id="a_t_p___f_t5206_8h_html"><div class="ttname"><a href="_t_p___f_t5206_8h.html">TP_FT5206.h</a></div><div class="ttdoc">本例程为触摸 IC 驱动: FT5206 敦泰电子(FocalTech)</div></div>
<div class="ttc" id="a_t_p___f_t6336_8c_html_aa77f83f70b13c86ec2718be1c6adc5ba"><div class="ttname"><a href="_t_p___f_t6336_8c.html#aa77f83f70b13c86ec2718be1c6adc5ba">ft6336_init</a></div><div class="ttdeci">uint8_t ft6336_init(void)</div><div class="ttdoc">初始化 TP_IC</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___f_t6336_8c_source.html#l00137">TP_FT6336.c:137</a></div></div>
<div class="ttc" id="a_t_p___f_t6336_8c_html_ad97b1b8850358ee6c69e3a1e25968d1e"><div class="ttname"><a href="_t_p___f_t6336_8c.html#ad97b1b8850358ee6c69e3a1e25968d1e">ft6336_read_points</a></div><div class="ttdeci">uint8_t ft6336_read_points(tp_data_t *p_data, uint8_t points)</div><div class="ttdoc">读取触摸点数据</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___f_t6336_8c_source.html#l00197">TP_FT6336.c:197</a></div></div>
<div class="ttc" id="a_t_p___f_t6336_8h_html"><div class="ttname"><a href="_t_p___f_t6336_8h.html">TP_FT6336.h</a></div><div class="ttdoc">本例程为触摸 IC 驱动: FT6336 敦泰电子(FocalTech)</div></div>
<div class="ttc" id="a_t_p___g_t911_8c_html_a5608f2d5eda0220a6ac23f3c87a46b20"><div class="ttname"><a href="_t_p___g_t911_8c.html#a5608f2d5eda0220a6ac23f3c87a46b20">gt9x_init</a></div><div class="ttdeci">uint8_t gt9x_init(void)</div><div class="ttdoc">初始化 TP_IC</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___g_t911_8c_source.html#l00177">TP_GT911.c:177</a></div></div>
<div class="ttc" id="a_t_p___g_t911_8c_html_aa83bf1a4b564b246d303c28944d275fb"><div class="ttname"><a href="_t_p___g_t911_8c.html#aa83bf1a4b564b246d303c28944d275fb">gt9x_read_points</a></div><div class="ttdeci">uint8_t gt9x_read_points(tp_data_t *p_data, uint8_t points)</div><div class="ttdoc">读取触摸点数据</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___g_t911_8c_source.html#l00241">TP_GT911.c:241</a></div></div>
<div class="ttc" id="a_t_p___g_t911_8h_html"><div class="ttname"><a href="_t_p___g_t911_8h.html">TP_GT911.h</a></div><div class="ttdoc">本例程为触摸 IC 驱动: GT911(汇顶科技)</div></div>
<div class="ttc" id="a_t_p___i_l_i2117_a_8c_html_a480e40a4792ec713b441d8d1880bfd09"><div class="ttname"><a href="_t_p___i_l_i2117_a_8c.html#a480e40a4792ec713b441d8d1880bfd09">ili2117a_read_points</a></div><div class="ttdeci">uint8_t ili2117a_read_points(tp_data_t *p_data, uint8_t points)</div><div class="ttdoc">读取触摸点数据</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___i_l_i2117_a_8c_source.html#l00169">TP_ILI2117A.c:169</a></div></div>
<div class="ttc" id="a_t_p___i_l_i2117_a_8c_html_aceee704e77dcfa7ddfa00e3d2450f6a6"><div class="ttname"><a href="_t_p___i_l_i2117_a_8c.html#aceee704e77dcfa7ddfa00e3d2450f6a6">ili2117a_init</a></div><div class="ttdeci">uint8_t ili2117a_init(void)</div><div class="ttdoc">初始化 TP_IC</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___i_l_i2117_a_8c_source.html#l00127">TP_ILI2117A.c:127</a></div></div>
<div class="ttc" id="a_t_p___i_l_i2117_a_8h_html"><div class="ttname"><a href="_t_p___i_l_i2117_a_8h.html">TP_ILI2117A.h</a></div><div class="ttdoc">本例程为触摸 IC 驱动: ILI2117A(奕力)</div></div>
<div class="ttc" id="a_t_p___tango___c32_8c_html_a07960df025fbd2b94adb95a629e2f897"><div class="ttname"><a href="_t_p___tango___c32_8c.html#a07960df025fbd2b94adb95a629e2f897">tango_c32_init</a></div><div class="ttdeci">uint8_t tango_c32_init(void)</div><div class="ttdoc">初始化 TP_IC</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___tango___c32_8c_source.html#l00127">TP_Tango_C32.c:127</a></div></div>
<div class="ttc" id="a_t_p___tango___c32_8c_html_a572b4cb1eb277e324904f37d7f16ce3f"><div class="ttname"><a href="_t_p___tango___c32_8c.html#a572b4cb1eb277e324904f37d7f16ce3f">tango_c32_read_points</a></div><div class="ttdeci">uint8_t tango_c32_read_points(tp_data_t *p_data, uint8_t points)</div><div class="ttdoc">读取触摸点数据</div><div class="ttdef"><b>Definition:</b> <a href="_t_p___tango___c32_8c_source.html#l00170">TP_Tango_C32.c:170</a></div></div>
<div class="ttc" id="a_t_p___tango___c32_8h_html"><div class="ttname"><a href="_t_p___tango___c32_8h.html">TP_Tango_C32.h</a></div><div class="ttdoc">本例程为触摸 IC 驱动: Tango C32( &lt;PIXCIR&gt; 瀚瑞微)</div></div>
<div class="ttc" id="adev__touch_8c_html_a1f8d52db1d1006c9c286828db79a820a"><div class="ttname"><a href="dev__touch_8c.html#a1f8d52db1d1006c9c286828db79a820a">TP_Points_Data</a></div><div class="ttdeci">static tp_data_t TP_Points_Data[TP_MAX_POINTS]</div><div class="ttdoc">触摸点数据流</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8c_source.html#l00068">dev_touch.c:68</a></div></div>
<div class="ttc" id="adev__touch_8c_html_a3d600ad47f709a0dcfa5cbf1a00fc31a"><div class="ttname"><a href="dev__touch_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31a">irq_flag_t</a></div><div class="ttdeci">irq_flag_t</div><div class="ttdoc">中断标志</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8c_source.html#l00057">dev_touch.c:58</a></div></div>
<div class="ttc" id="adev__touch_8c_html_a3d600ad47f709a0dcfa5cbf1a00fc31aa0d077f5b932ce05e5b9f30c6087a2f31"><div class="ttname"><a href="dev__touch_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31aa0d077f5b932ce05e5b9f30c6087a2f31">NO</a></div><div class="ttdeci">@ NO</div><div class="ttdoc">未触发中断</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8c_source.html#l00059">dev_touch.c:59</a></div></div>
<div class="ttc" id="adev__touch_8c_html_a3d600ad47f709a0dcfa5cbf1a00fc31aa2bc49ec37d6a5715dd23e85f1ff5bb59"><div class="ttname"><a href="dev__touch_8c.html#a3d600ad47f709a0dcfa5cbf1a00fc31aa2bc49ec37d6a5715dd23e85f1ff5bb59">OK</a></div><div class="ttdeci">@ OK</div><div class="ttdoc">已触发中断</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8c_source.html#l00062">dev_touch.c:60</a></div></div>
<div class="ttc" id="adev__touch_8c_html_a4155438389d8b8b802f7f20534056bf0"><div class="ttname"><a href="dev__touch_8c.html#a4155438389d8b8b802f7f20534056bf0">touch_handler</a></div><div class="ttdeci">void touch_handler(dev_tp_t *dev)</div><div class="ttdoc">触摸事件处理</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8c_source.html#l00174">dev_touch.c:174</a></div></div>
<div class="ttc" id="adev__touch_8c_html_a5a167336ba39168b4117c85a7f7f364e"><div class="ttname"><a href="dev__touch_8c.html#a5a167336ba39168b4117c85a7f7f364e">TP_MAX_POINTS</a></div><div class="ttdeci">#define TP_MAX_POINTS</div><div class="ttdoc">电容屏支持的点数,固定最大为5点</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8c_source.html#l00042">dev_touch.c:42</a></div></div>
<div class="ttc" id="adev__touch_8c_html_a84c114ba14f4f7ca7c2258db06b98d87"><div class="ttname"><a href="dev__touch_8c.html#a84c114ba14f4f7ca7c2258db06b98d87">Dev_TP</a></div><div class="ttdeci">dev_tp_t Dev_TP</div><div class="ttdoc">触摸屏设备</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8c_source.html#l00073">dev_touch.c:73</a></div></div>
<div class="ttc" id="adev__touch_8c_html_a84efe5d28ced56c26ea07c936b7a625a"><div class="ttname"><a href="dev__touch_8c.html#a84efe5d28ced56c26ea07c936b7a625a">isr_exti_tp_int</a></div><div class="ttdeci">void isr_exti_tp_int(void)</div><div class="ttdoc">EXTI TP_INT ISR Callback (GPIO 输入边沿中断)</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8c_source.html#l00125">dev_touch.c:125</a></div></div>
<div class="ttc" id="adev__touch_8c_html_aa04ed8d9159d0fe710b89b9f83109a2c"><div class="ttname"><a href="dev__touch_8c.html#aa04ed8d9159d0fe710b89b9f83109a2c">touch_close</a></div><div class="ttdeci">static void touch_close(void)</div><div class="ttdoc">关闭 Touch 设备通讯接口, 进入低功耗前使用</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8c_source.html#l00211">dev_touch.c:211</a></div></div>
<div class="ttc" id="adev__touch_8c_html_ab6150fbc07d4a5fe08cc7aa42d8d173e"><div class="ttname"><a href="dev__touch_8c.html#ab6150fbc07d4a5fe08cc7aa42d8d173e">IRQ_Flag_TP</a></div><div class="ttdeci">static volatile uint8_t IRQ_Flag_TP</div><div class="ttdoc">TP_INT 边沿脉冲触发标志</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8c_source.html#l00065">dev_touch.c:65</a></div></div>
<div class="ttc" id="adev__touch_8c_html_ad79fb3af238f076a0aa90e32a43ab77e"><div class="ttname"><a href="dev__touch_8c.html#ad79fb3af238f076a0aa90e32a43ab77e">touch_init</a></div><div class="ttdeci">uint8_t touch_init(dev_tp_t *dev)</div><div class="ttdoc">初始化触摸设备驱动</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8c_source.html#l00140">dev_touch.c:140</a></div></div>
<div class="ttc" id="adev__touch_8h_html"><div class="ttname"><a href="dev__touch_8h.html">dev_touch.h</a></div><div class="ttdoc">TP 触摸设备驱动层</div></div>
<div class="ttc" id="adev__touch_8h_html_a0f516787a212a8060cd70b0d03ae1b13"><div class="ttname"><a href="dev__touch_8h.html#a0f516787a212a8060cd70b0d03ae1b13">TP_PIN_INT</a></div><div class="ttdeci">#define TP_PIN_INT</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00036">dev_touch.h:36</a></div></div>
<div class="ttc" id="adev__touch_8h_html_a46828f8d24ffd6580f185ce41bd262eb"><div class="ttname"><a href="dev__touch_8h.html#a46828f8d24ffd6580f185ce41bd262eb">TP_I2C_X</a></div><div class="ttdeci">#define TP_I2C_X</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00053">dev_touch.h:53</a></div></div>
<div class="ttc" id="adev__touch_8h_html_a479dbee3a96123ab3deb85133104cbab"><div class="ttname"><a href="dev__touch_8h.html#a479dbee3a96123ab3deb85133104cbab">TP_INT_IRQn</a></div><div class="ttdeci">#define TP_INT_IRQn</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00037">dev_touch.h:37</a></div></div>
<div class="ttc" id="adev__touch_8h_html_a4d8890ebc8ff6e7826af41519043e77ea03d9705d179305c0dc4c1ef0fce65b83"><div class="ttname"><a href="dev__touch_8h.html#a4d8890ebc8ff6e7826af41519043e77ea03d9705d179305c0dc4c1ef0fce65b83">TP_MODE_INT_RX</a></div><div class="ttdeci">@ TP_MODE_INT_RX</div><div class="ttdoc">中断接收模式(INT触发)</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00147">dev_touch.h:146</a></div></div>
<div class="ttc" id="adev__touch_8h_html_a4d8890ebc8ff6e7826af41519043e77ea341fdaa08fa997570c0b89e6e4bf5068"><div class="ttname"><a href="dev__touch_8h.html#a4d8890ebc8ff6e7826af41519043e77ea341fdaa08fa997570c0b89e6e4bf5068">TP_MODE_POLLING_RDONLY</a></div><div class="ttdeci">@ TP_MODE_POLLING_RDONLY</div><div class="ttdoc">轮询模式</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00145">dev_touch.h:145</a></div></div>
<div class="ttc" id="adev__touch_8h_html_a886e6b681d04e833135384b906c35855"><div class="ttname"><a href="dev__touch_8h.html#a886e6b681d04e833135384b906c35855">TP_GPIO_INT</a></div><div class="ttdeci">#define TP_GPIO_INT</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00035">dev_touch.h:35</a></div></div>
<div class="ttc" id="adev__touch_8h_html_a9fffde3171a44771a6e9f8f0cbb52d71a0b306b969e605870813a875062f36d2a"><div class="ttname"><a href="dev__touch_8h.html#a9fffde3171a44771a6e9f8f0cbb52d71a0b306b969e605870813a875062f36d2a">TP_EVENT_PRESSED</a></div><div class="ttdeci">@ TP_EVENT_PRESSED</div><div class="ttdoc">触屏按下</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00123">dev_touch.h:122</a></div></div>
<div class="ttc" id="adev__touch_8h_html_a9fffde3171a44771a6e9f8f0cbb52d71a693480a7cbe7d8d0a9d07a2d66ee9da2"><div class="ttname"><a href="dev__touch_8h.html#a9fffde3171a44771a6e9f8f0cbb52d71a693480a7cbe7d8d0a9d07a2d66ee9da2">TP_EVENT_RELEASED</a></div><div class="ttdeci">@ TP_EVENT_RELEASED</div><div class="ttdoc">触屏释放</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00121">dev_touch.h:121</a></div></div>
<div class="ttc" id="adev__touch_8h_html_ab82e9fc0994f9cf732d62c6e02271973a5b57370396b7de414e4132f4fadc8885"><div class="ttname"><a href="dev__touch_8h.html#ab82e9fc0994f9cf732d62c6e02271973a5b57370396b7de414e4132f4fadc8885">TP_TYPE_CT</a></div><div class="ttdeci">@ TP_TYPE_CT</div><div class="ttdoc">电容式触摸屏</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00138">dev_touch.h:138</a></div></div>
<div class="ttc" id="amain_8c_html_a7d9f2d02fb8222f2a32fc7eeeed8e655"><div class="ttname"><a href="main_8c.html#a7d9f2d02fb8222f2a32fc7eeeed8e655">Systick_Ms_TP</a></div><div class="ttdeci">volatile uint32_t Systick_Ms_TP</div><div class="ttdoc">手指触摸释放时长 / ms, 反映屏幕多长时间未被点击, 一旦有新的点击触发, 其值立即清零</div><div class="ttdef"><b>Definition:</b> <a href="main_8c_source.html#l00056">main.c:56</a></div></div>
<div class="ttc" id="astructdev__tp__t_html"><div class="ttname"><a href="structdev__tp__t.html">dev_tp_t</a></div><div class="ttdoc">触摸屏设备类</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00150">dev_touch.h:151</a></div></div>
<div class="ttc" id="astructdev__tp__t_html_a4f710901c7b478810ab1e3d1b7332989"><div class="ttname"><a href="structdev__tp__t.html#a4f710901c7b478810ab1e3d1b7332989">dev_tp_t::read_cb</a></div><div class="ttdeci">uint8_t(*const read_cb)(tp_data_t *p_data, uint8_t points)</div><div class="ttdoc">(返回读取到的触点信息的个数)&lt;读取触摸点数据&gt;(触摸点数据, 期望读取的触摸点数)</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00161">dev_touch.h:161</a></div></div>
<div class="ttc" id="astructdev__tp__t_html_a7b6262bfcb571b59fb3f322165d24a05"><div class="ttname"><a href="structdev__tp__t.html#a7b6262bfcb571b59fb3f322165d24a05">dev_tp_t::points_num</a></div><div class="ttdeci">const uint8_t points_num</div><div class="ttdoc">触摸点上限</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00153">dev_touch.h:153</a></div></div>
<div class="ttc" id="astructdev__tp__t_html_ad0f91d3c2b3f1fef36a3530341576d6b"><div class="ttname"><a href="structdev__tp__t.html#ad0f91d3c2b3f1fef36a3530341576d6b">dev_tp_t::init_cb</a></div><div class="ttdeci">uint8_t(*const init_cb)(void)</div><div class="ttdoc">(return: 0 - success other - error_code)&lt;触摸设备初始化&gt;(None)</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00158">dev_touch.h:158</a></div></div>
<div class="ttc" id="astructdev__tp__t_html_ade186a1e352f443f71fa39c14af5b674"><div class="ttname"><a href="structdev__tp__t.html#ade186a1e352f443f71fa39c14af5b674">dev_tp_t::point</a></div><div class="ttdeci">tp_data_t * point</div><div class="ttdoc">触摸点数据</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00152">dev_touch.h:152</a></div></div>
<div class="ttc" id="astructdev__tp__t_html_af3031ab65710d467a459643a51e94949"><div class="ttname"><a href="structdev__tp__t.html#af3031ab65710d467a459643a51e94949">dev_tp_t::mode</a></div><div class="ttdeci">const tp_mode_t mode</div><div class="ttdoc">触摸设备工作模式</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00155">dev_touch.h:155</a></div></div>
<div class="ttc" id="astructtp__data__t_html"><div class="ttname"><a href="structtp__data__t.html">tp_data_t</a></div><div class="ttdoc">触摸数据结构体</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00126">dev_touch.h:127</a></div></div>
<div class="ttc" id="astructtp__data__t_html_a09a2a45f731b02946ff6d3cd15c1a476"><div class="ttname"><a href="structtp__data__t.html#a09a2a45f731b02946ff6d3cd15c1a476">tp_data_t::width</a></div><div class="ttdeci">uint8_t width</div><div class="ttdoc">触摸点的宽度大小(Reserve)</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00131">dev_touch.h:131</a></div></div>
<div class="ttc" id="astructtp__data__t_html_a4dde988b1b2adba65ae3efa69f65d960"><div class="ttname"><a href="structtp__data__t.html#a4dde988b1b2adba65ae3efa69f65d960">tp_data_t::x</a></div><div class="ttdeci">uint16_t x</div><div class="ttdoc">触摸点 X 轴坐标</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00128">dev_touch.h:128</a></div></div>
<div class="ttc" id="astructtp__data__t_html_a5202f2d226d6bf6ec85c52304098acd2"><div class="ttname"><a href="structtp__data__t.html#a5202f2d226d6bf6ec85c52304098acd2">tp_data_t::event</a></div><div class="ttdeci">tp_event_t event</div><div class="ttdoc">触摸事件(抬起/按下/移动等等)</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00130">dev_touch.h:130</a></div></div>
<div class="ttc" id="astructtp__data__t_html_ab0580f504a7428539be299fa71565f30"><div class="ttname"><a href="structtp__data__t.html#ab0580f504a7428539be299fa71565f30">tp_data_t::y</a></div><div class="ttdeci">uint16_t y</div><div class="ttdoc">触摸点 Y 轴坐标</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00129">dev_touch.h:129</a></div></div>
<div class="ttc" id="astructtp__data__t_html_ad46edbc9fffadbdca72080b49ea63ac8"><div class="ttname"><a href="structtp__data__t.html#ad46edbc9fffadbdca72080b49ea63ac8">tp_data_t::track_id</a></div><div class="ttdeci">uint8_t track_id</div><div class="ttdoc">每个触摸点的触摸轨迹(Reserve)</div><div class="ttdef"><b>Definition:</b> <a href="dev__touch_8h_source.html#l00132">dev_touch.h:132</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
